#ifndef CHILDWINDOW_H
#define CHILDWINDOW_H

#include <QWidget>
#include <QString>
#include <QPaintEvent>
#include <QPainter>
#include <QMainWindow>
#include <QScrollArea>
#include <QScrollBar>
#include <QSplitter>
#include "pdfkit.h"
#include "docwidget.h"
#include "mainwindow.h"
#include "naviview.h"


class MainWindow;
class DocWidget;
class Naviview;


class ChildWindow : public QWidget
{
    Q_OBJECT
public:
    ChildWindow(){}
    ChildWindow(QString path, MainWindow *parent=0);
    ~ChildWindow();

    PDFKit *pdf;
    int multiple;

    DocWidget *docWidget;
    QSplitter *splitter;
    Naviview *leftWidget;
    DocWidget *rightWidget;

    void resizeEvent(QResizeEvent *e);
    void paintEvent(QPaintEvent *e);
    void refreshWindow();
    void gotoPage(int page);
    int getCurrentPage();
    void changeImageSize(int flag);
    void refreshWidget();
signals:
    void page_change(int page);


};

#endif // CHILDWINDOW_H
